import request from '@/utils/request'

// 查询我频道下的视频列表
export function listChannelvideo(query) {
  return request({
    url: '/shortplay/channelvideo/list',
    method: 'get',
    params: query
  })
}

// 查询我频道下的视频详细
export function getChannelvideo(id) {
  return request({
    url: '/shortplay/channelvideo/' + id,
    method: 'get'
  })
}

// 新增我频道下的视频
export function addChannelvideo(data) {
  return request({
    url: '/shortplay/channelvideo',
    method: 'post',
    data: data
  })
}

// 修改我频道下的视频
export function updateChannelvideo(data) {
  return request({
    url: '/shortplay/channelvideo',
    method: 'put',
    data: data
  })
}

// 删除我频道下的视频
export function delChannelvideo(id) {
  return request({
    url: '/shortplay/channelvideo/' + id,
    method: 'delete'
  })
}

// 获取频道列表
export function getChannelAllList() {
  return request({
    url: '/youtobe/channel/allList',
    method: 'get',
    params: {
      sourc: 'MY'
    }
  })
}

// 修改我频道下的视频
export function updateByVideoId(data) {
  return request({
    url: '/shortplay/channelvideo/updateByVideoId',
    method: 'put',
    data: data
  })
}

// 新增我频道下的视频
export function addSupportedLanguages(data) {
  return request({
    url: '/shortplay/channelvideo/addSupportedLanguages',
    method: 'post',
    data: data
  })
}
